package pt.compflow.activity.gateway;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import pt.compflow.flowontology.model.FlowOntologyModel;
import pt.compflow.flowontology.model.Gateway;
import pt.compflow.tools.OntModelHelper;

public class MergeAskGateway extends MergeInputGateway {
	
	private static final Logger LOG = LoggerFactory.getLogger(MergeAskGateway.class);
	
	protected AskEvaluationFilter filter;
	protected List<String> nextActivities;

	public MergeAskGateway() {
	}

	public MergeAskGateway(OntModelHelper ontModelHelper, FlowOntologyModel jobModel, Gateway gateway) {
		super(ontModelHelper, jobModel, gateway);
	}

	@Override
	public void execute() {
		LOG.debug("Running execution method on MergeAskGateway");
		filter = new AskEvaluationFilter(ontModelHelper, jobModel, gateway);
		nextActivities = filter.getNextActivities();		
	}

	@Override
	public GatewayExecutor copy() {
		return new MergeAskGateway(ontModelHelper, jobModel, gateway);
	}

	@Override
	public List<String> getNextActivities() {
		return nextActivities;
	}

}
